package com.estate.service.project;

import java.util.ArrayList;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.estate.mapper.ProjectMapper;
import com.estate.pojo.Ban;
import com.estate.pojo.Project;

@Service
public class ProjectServiceImpl implements ProjectService {
	@Autowired
	private ProjectMapper projectMapper;
	

	@Override
	public List<Project> allProNameAndCityName() throws Exception {
		return projectMapper.allProNameAndCityName();
	}

	//查询所有项目
	@Override
	public List<Project> getAllProject() {
		return projectMapper.getAllProject();
	}

	@Override
	public List<Project> getProjectByProId(Integer ProId) {
		List<Project> banlist = new ArrayList<>();
		try {
			banlist = projectMapper.getProjectByProId(ProId);
		} catch (Exception e) {
			e.printStackTrace();
		}
		return banlist;
	}

	@Override
	public List<Project> getMessByPorId(Integer ProId) {
		List<Project> porjectlist = new ArrayList<>();
		try {
			porjectlist = projectMapper.getMessByPorId(ProId);
		} catch (Exception e) {
			e.printStackTrace();
		}
		return porjectlist;
	}

}
